Optimal. Leaf size=114 \[ \frac {d \cos (c) \text {Ci}(d x)}{a}-\frac {b \text {Ci}(d x) \sin (c)}{a^2}+\frac {b \text {Ci}\left (\frac {a d}{b}+d x\right ) \sin \left (c-\frac {a d}{b}\right )}{a^2}-\frac {\sin (c+d x)}{a x}-\frac {b \cos (c) \text {Si}(d x)}{a^2}-\frac {d \sin (c) \text {Si}(d x)}{a}+\frac {b \cos \left (c-\frac {a d}{b}\right ) \text {Si}\left (\frac {a d}{b}+d x\right )}{a^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.24, antiderivative size = 114, normalized size of antiderivative = 1.00, number of steps
used = 12, number of rules used = 5, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.294, Rules used = {6874, 3378,
3384, 3380, 3383} \begin {gather*} -\frac {b \sin (c) \text {CosIntegral}(d x)}{a^2}+\frac {b \sin \left (c-\frac {a d}{b}\right ) \text {CosIntegral}\left (\frac {a d}{b}+d x\right )}{a^2}-\frac {b \cos (c) \text {Si}(d x)}{a^2}+\frac {b \cos \left (c-\frac {a d}{b}\right ) \text {Si}\left (x d+\frac {a d}{b}\right )}{a^2}+\frac {d \cos (c) \text {CosIntegral}(d x)}{a}-\frac {d \sin (c) \text {Si}(d x)}{a}-\frac {\sin (c+d x)}{a x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3378
Rule 3380
Rule 3383
Rule 3384
Rule 6874
Rubi steps
\begin {align*} \int \frac {\sin (c+d x)}{x^2 (a+b x)} \, dx &=\int \left (\frac {\sin (c+d x)}{a x^2}-\frac {b \sin (c+d x)}{a^2 x}+\frac {b^2 \sin (c+d x)}{a^2 (a+b x)}\right ) \, dx\\ &=\frac {\int \frac {\sin (c+d x)}{x^2} \, dx}{a}-\frac {b \int \frac {\sin (c+d x)}{x} \, dx}{a^2}+\frac {b^2 \int \frac {\sin (c+d x)}{a+b x} \, dx}{a^2}\\ &=-\frac {\sin (c+d x)}{a x}+\frac {d \int \frac {\cos (c+d x)}{x} \, dx}{a}-\frac {(b \cos (c)) \int \frac {\sin (d x)}{x} \, dx}{a^2}+\frac {\left (b^2 \cos \left (c-\frac {a d}{b}\right )\right ) \int \frac {\sin \left (\frac {a d}{b}+d x\right )}{a+b x} \, dx}{a^2}-\frac {(b \sin (c)) \int \frac {\cos (d x)}{x} \, dx}{a^2}+\frac {\left (b^2 \sin \left (c-\frac {a d}{b}\right )\right ) \int \frac {\cos \left (\frac {a d}{b}+d x\right )}{a+b x} \, dx}{a^2}\\ &=-\frac {b \text {Ci}(d x) \sin (c)}{a^2}+\frac {b \text {Ci}\left (\frac {a d}{b}+d x\right ) \sin \left (c-\frac {a d}{b}\right )}{a^2}-\frac {\sin (c+d x)}{a x}-\frac {b \cos (c) \text {Si}(d x)}{a^2}+\frac {b \cos \left (c-\frac {a d}{b}\right ) \text {Si}\left (\frac {a d}{b}+d x\right )}{a^2}+\frac {(d \cos (c)) \int \frac {\cos (d x)}{x} \, dx}{a}-\frac {(d \sin (c)) \int \frac {\sin (d x)}{x} \, dx}{a}\\ &=\frac {d \cos (c) \text {Ci}(d x)}{a}-\frac {b \text {Ci}(d x) \sin (c)}{a^2}+\frac {b \text {Ci}\left (\frac {a d}{b}+d x\right ) \sin \left (c-\frac {a d}{b}\right )}{a^2}-\frac {\sin (c+d x)}{a x}-\frac {b \cos (c) \text {Si}(d x)}{a^2}-\frac {d \sin (c) \text {Si}(d x)}{a}+\frac {b \cos \left (c-\frac {a d}{b}\right ) \text {Si}\left (\frac {a d}{b}+d x\right )}{a^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.25, size = 101, normalized size = 0.89 \begin {gather*} \frac {x \text {Ci}(d x) (a d \cos (c)-b \sin (c))+b x \text {Ci}\left (d \left (\frac {a}{b}+x\right )\right ) \sin \left (c-\frac {a d}{b}\right )-a \sin (c+d x)-b x \cos (c) \text {Si}(d x)-a d x \sin (c) \text {Si}(d x)+b x \cos \left (c-\frac {a d}{b}\right ) \text {Si}\left (d \left (\frac {a}{b}+x\right )\right )}{a^2 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.10, size = 144, normalized size = 1.26
method | result | size |
derivativedivides | \(d \left (\frac {-\frac {\sin \left (d x +c \right )}{d x}-\sinIntegral \left (d x \right ) \sin \left (c \right )+\cosineIntegral \left (d x \right ) \cos \left (c \right )}{a}-\frac {b \left (\sinIntegral \left (d x \right ) \cos \left (c \right )+\cosineIntegral \left (d x \right ) \sin \left (c \right )\right )}{a^{2} d}+\frac {b^{2} \left (\frac {\sinIntegral \left (d x +c +\frac {d a -c b}{b}\right ) \cos \left (\frac {d a -c b}{b}\right )}{b}-\frac {\cosineIntegral \left (d x +c +\frac {d a -c b}{b}\right ) \sin \left (\frac {d a -c b}{b}\right )}{b}\right )}{a^{2} d}\right )\) | \(144\) |
default | \(d \left (\frac {-\frac {\sin \left (d x +c \right )}{d x}-\sinIntegral \left (d x \right ) \sin \left (c \right )+\cosineIntegral \left (d x \right ) \cos \left (c \right )}{a}-\frac {b \left (\sinIntegral \left (d x \right ) \cos \left (c \right )+\cosineIntegral \left (d x \right ) \sin \left (c \right )\right )}{a^{2} d}+\frac {b^{2} \left (\frac {\sinIntegral \left (d x +c +\frac {d a -c b}{b}\right ) \cos \left (\frac {d a -c b}{b}\right )}{b}-\frac {\cosineIntegral \left (d x +c +\frac {d a -c b}{b}\right ) \sin \left (\frac {d a -c b}{b}\right )}{b}\right )}{a^{2} d}\right )\) | \(144\) |
risch | \(-\frac {d \,{\mathrm e}^{i c} \expIntegral \left (1, -i d x \right )}{2 a}+\frac {i b \,{\mathrm e}^{-\frac {i \left (d a -c b \right )}{b}} \expIntegral \left (1, -i d x -i c -\frac {i a d -i b c}{b}\right )}{2 a^{2}}-\frac {i b \,{\mathrm e}^{i c} \expIntegral \left (1, -i d x \right )}{2 a^{2}}-\frac {i b \,{\mathrm e}^{\frac {i \left (d a -c b \right )}{b}} \expIntegral \left (1, i d x +i c +\frac {i \left (d a -c b \right )}{b}\right )}{2 a^{2}}-\frac {d \,{\mathrm e}^{-i c} \expIntegral \left (1, i d x \right )}{2 a}+\frac {i {\mathrm e}^{-i c} \expIntegral \left (1, i d x \right ) b}{2 a^{2}}-\frac {\sin \left (d x +c \right )}{a x}\) | \(188\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 157, normalized size = 1.38 \begin {gather*} \frac {2 \, b x \cos \left (-\frac {b c - a d}{b}\right ) \operatorname {Si}\left (\frac {b d x + a d}{b}\right ) + {\left (a d x \operatorname {Ci}\left (d x\right ) + a d x \operatorname {Ci}\left (-d x\right ) - 2 \, b x \operatorname {Si}\left (d x\right )\right )} \cos \left (c\right ) - 2 \, a \sin \left (d x + c\right ) - {\left (2 \, a d x \operatorname {Si}\left (d x\right ) + b x \operatorname {Ci}\left (d x\right ) + b x \operatorname {Ci}\left (-d x\right )\right )} \sin \left (c\right ) - {\left (b x \operatorname {Ci}\left (\frac {b d x + a d}{b}\right ) + b x \operatorname {Ci}\left (-\frac {b d x + a d}{b}\right )\right )} \sin \left (-\frac {b c - a d}{b}\right )}{2 \, a^{2} x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sin {\left (c + d x \right )}}{x^{2} \left (a + b x\right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 3.83, size = 2897, normalized size = 25.41 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\sin \left (c+d\,x\right )}{x^2\,\left (a+b\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________